#include <stdio.h>
#include <stdlib.h>
#include <math.h>


int main()
{
	double num, result;
	char ch;
	printf("please input:");
	scanf("%lf %c", &num, &ch);
	switch (ch)
	{
		case 'S':
		case 's':
			result = sin(num);
			break;
		case 'C':
		case 'c':
			result = cos(num);
			break;
		case 'T':
		case 't':
			result = tan(num);
			break;
		default:
			printf("invalid input\n");
			return -1;
	}
	printf("%lf\n", result);
	
	if(ch == 's' || ch == 'S')result = sin(num);
	else if(ch == 'c' || ch == 'C')result = cos(num);
	else if(ch =='t' || ch =='T')result = tan(num);
	else {
		printf("invalid input\n");
		return -1;
	}
	
	printf("%lf\n", result);
	
	return 0;
}
